<template>
  <el-tabs v-model="activeName" @tab-change="handleChange">
    <el-tab-pane label="医管公司" name="first">
      <Hospital ref="HospitalRef" />
    </el-tab-pane>
    <el-tab-pane label="医疗实验室" name="second"
      ><Lab ref="LabRef"
    /></el-tab-pane>
  </el-tabs>
</template>

<script setup>
import { ref } from "vue";
import { ElTabPane, ElTabs } from "element-plus";
import Hospital from "./Hospital.vue";
import Lab from "./Lab.vue";
const activeName = ref("second");
const HospitalRef = ref();
const LabRef = ref();
function handleChange(params) {
  params == "first"
    ? HospitalRef.value?.handleRefresh()
    : LabRef.value?.handleRefresh();
}
</script>

<style lang="scss" scoped>
@import url("@/styles/daily.scss");
</style>
